package com.qzsoft.zhjd.machine.modules.machineinfo.controller;

import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.jeemis.common.utils.Result;
import com.qzsoft.zhjd.common.utils.ResultUtils;
import com.qzsoft.zhjd.machine.modules.machineinfo.dto.MachineDepreciationDto;
import com.qzsoft.zhjd.machine.modules.machineinfo.service.MachineDepreciationService;

/**
 * @ClassName MachineDepreciationController
 * @Description 设备折旧控制器
 * @author linhuawei
 * @since 2021-11-17
 */
@RestController
@RequestMapping("/api/machineDepreciation")
public class MachineDepreciationController {
    
    @Autowired
    private MachineDepreciationService machineDepreciationService;
    
    /**
     * @Title page
     * @Description 获取折旧信息分页列表
     * @param params 查询条件
     * @return 折旧信息分页列表
     */
    @RequiresPermissions("api:machinedepreciation:list")
    @GetMapping("/page")
    public Result<IPage<MachineDepreciationDto>> page(@RequestParam Map<String, Object> params){
        IPage<MachineDepreciationDto> page = machineDepreciationService.page(params);
        return ResultUtils.ok(page);
    }

}
